<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Game extends CI_Controller {

	public function __construct()
	{
		parent::__construct();

		if (!$this->ion_auth->logged_in())
		{
			redirect('auth/login');
		}
	}

	public function index()
	{
		$this->lang->load('game');

		$data['title'] = 'Overview';
		$data['user'] = $this->ion_auth->get_user();
		$data['tick'] = 15-(date('i', time()) % 15);

		$this->template->write_view('header', 'game/header', $data, TRUE);
		$this->template->write_view('nav', 'game/nav', $data, TRUE);
		$this->template->write_view('content', 'game/index', $data, TRUE);
		$this->template->write_view('footer', 'game/footer', $data, TRUE);
		$this->template->render();
	}
}